package cn.kgc.springboot.redis.controller;

import cn.kgc.springboot.redis.service.EmpService;
import cn.kgc.springboot.redis.vo.EmpVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: 课工场
 * @Version: v1.0  2023/7/26
 * @Description:
 */
@RestController
@RequestMapping("emp")
public class EmpController {

    @Autowired
    private EmpService empService;

    @RequestMapping("list")
    public List<EmpVO> getList(){
       return empService.getEmpVOList();
    }


    @RequestMapping("delete")
    public Boolean delete(Integer id){
        return empService.removeById(id);
    }


}
